package net.borlis.sample.service.entities.common;

import java.util.Date;

/**
 * The standard dynamix entity interface. The methods must be implement because mentioned fields will be used
 * for the export data mechanism.
 *
 * @author alex@borlis.net
 */
public interface IEntity extends BaseEntityInterface {

    /**
     * Provides the state of the entity (using in the export mechanism).
     * @return the state
     */
    Boolean getLocked();

    /**
     * Set the state of the entity (using in the export mechanism).
     * @param locked the new state
     */
    void setLocked(Boolean locked);

    /**
     * Provides the id of the user who was last editor of the entity.
     * @return the id of the last user-editor
     */
    Long getChangedBy();

    /**
     * Set new id of the last user-editor of the entity.
     * @param changedBy new id of the last user-editor
     */
    void setChangedBy(Long changedBy);

    /**
     * Provides the date of the last changes of the entity.
     * @return the date of last the changes
     */
    Date getChangedOn();

    /**
     * Set new date of the last changes of the entity.
     * @param changedOn the date of the last changes of the entity
     */
    void setChangedOn(Date changedOn);

    /**
     * Provides the type of the last changes (insert, update, delete).
     * @return the type of the changes
     */
    ChangeType getChangedType();

    /**
     * Set the type of the last changes of the entity (insert, update, delete).
     * @param changeType the type of the changes
     */
    void setChangedType(ChangeType changeType);

}
